package com.canaan.business.domain.bill;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.canaan.common.annotation.Excel;
import com.canaan.common.annotation.TableName;
import com.canaan.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 采购退货单对象 wms_purchase_return_bill
 *
 * @author ruoyi
 * @date 2023-03-13
 */
@Data
@ApiModel(description = "wms_purchase_return_bill")
@TableName("wms_purchase_return_bill")
public class PurchaseReturnBill extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** ID */
    @ApiModelProperty("${comment}")
    private Long id;

    /** 编号 */
    @Excel(name = "编号")
    @ApiModelProperty("编号")
    private String no;

    /** 单据状态 1新建 2进行中 3已完成 */
    @Excel(name = "单据状态 1新建 2进行中 3已完成")
    @ApiModelProperty("单据状态 1新建 2进行中 3已完成")
    private Integer status;

    /** 退货类型 */
    @Excel(name = "退货类型")
    @ApiModelProperty("退货类型")
    private Integer returnType;

    /** 退货原因 */
    @Excel(name = "退货原因")
    @ApiModelProperty("退货原因")
    private String returnCause;

    /** 完成时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "完成时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty("完成时间")
    private Date completeTime;

    /** 供应商编码 */
    @Excel(name = "供应商编码")
    @ApiModelProperty("供应商编码")
    private String supplierNo;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    @ApiModelProperty("供应商名称")
    private String supplierName;

    /** 仓库 */
    @Excel(name = "仓库")
    @ApiModelProperty("仓库")
    private String stockCode;

    /** 货主 */
    @Excel(name = "货主")
    @ApiModelProperty("货主")
    private String owner;

    /** 库存状态 */
    @Excel(name = "库存状态")
    @ApiModelProperty("库存状态")
    private String stockStatus;

    /** 收货数量 */
    @Excel(name = "收货数量")
    @ApiModelProperty("收货数量")
    private Long checkTotalQty;

    /** 预计入库时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "预计入库时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("预计入库时间")
    private Date arrivalDate;
    /** 是否短收 */
    @Excel(name = "是否短收")
    @ApiModelProperty("是否短收")
    private String shortMatch;
    /** 是否删除：1是 0否 */
    @ApiModelProperty("是否删除")
    private String delFlag;

    /** 查询已完成数据 */
    @ApiModelProperty("查询完成数据")
    private String searchFinish;
    /** 地址编号 */
    @ApiModelProperty("地址编号")
    private String cellCode;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("no", getNo())
            .append("status", getStatus())
            .append("returnType", getReturnType())
            .append("returnCause", getReturnCause())
            .append("completeTime", getCompleteTime())
            .append("supplierNo", getSupplierNo())
            .append("supplierName", getSupplierName())
            .append("remark", getRemark())
            .append("stockCode", getStockCode())
            .append("owner", getOwner())
            .append("stockStatus", getStockStatus())
            .append("arrivalDate", getArrivalDate())
            .append("shortMatch", getShortMatch())
            .append("createBy", getCreateBy())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("createTime", getCreateTime())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
